package com.atguigu.lease.app.controller;

import com.atguigu.lease.app.service.ApartmentInfoService;
import com.atguigu.lease.common.result.Result;
import com.atguigu.lease.model.vo.app.ApartmentDetailVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@Tag(name = "公寓模块")
@RestController
@RequestMapping("/app/apartment")
public class ApartmentController {
    @Autowired
    ApartmentInfoService apartmentInfoService;
    @Operation(summary = "1、根据id查询详情")
    @GetMapping("/getDetailById")
    public Result<ApartmentDetailVo> getDetailById(@RequestParam Long id) {
        return Result.ok(apartmentInfoService.getDetailById(id));
    }
}
